package com.buba.appointment.controller;

import com.buba.utils.AliOss;
import com.buba.utils.R;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import java.math.BigDecimal;

/**
 * @author xhh
 * @describe 描述
 * @date 2022/6/17 8:30
 * @ClassName Test
 */
@RestController
@RequestMapping("/test")
public class Test {
    @RequestMapping("/upLoadFile")
    public R upLoadFile(@RequestParam("surface") MultipartFile file){
        System.out.println(file);
        String upload = new AliOss().upload(file);
        return R.ok().data("data",upload);
    }

    @org.junit.Test
    public void run11(){
        BigDecimal b1=new BigDecimal(17);
        BigDecimal b2=new BigDecimal(16);
        System.out.println(b1.subtract(b2));
    }

}
